/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hitechbangla.fctu.base.base;

import com.hitechbangla.fctu.base.AutoLockable;
import com.hitechbangla.fctu.base.GameScene;
import com.hitechbangla.fctu.base.Location;
import fctu.simulator.HTB_MAIN;
import java.awt.Color;

import java.awt.Graphics;
import java.awt.Point;
import java.io.Serializable;

/**
 *
 * @author Asus
 */
public class Kpi extends AutoLockable implements Serializable
{
    private String name;    

    public Kpi(String name, Location location)
    {
	super(location);
	this.name = name;	
    }


    
    /**
     * @return the baseType
     */
    /*public kpiType getBaseType() {
	return kType;
    }*/

    /**
     * @param baseType the baseType to set
     */
    /*
    public void setkpiType(kpiType kpiType) {
	this.kType = kpiType;
    }*/

    /**
     * @return the location
     */
    
    
    public void draw(Graphics g)
    {
        int x = (int) (this.getLocation().getX() * HTB_MAIN.one_px_equivalent_naut);
        int y = (int) (this.getLocation().getY() * HTB_MAIN.one_px_equivalent_naut);
        
        Color color = g.getColor();
        g.setColor(Color.blue);
        g.fillRect(x-GameScene.rectSize/2, y-GameScene.rectSize/2, GameScene.rectSize, GameScene.rectSize);
        g.setColor(Color.BLACK);
        HTB_MAIN.customDrawString(g, getName(), new Point(x, y - 3));
        g.setColor(color);
    }

    /**
     * @return the name
     */
    public String getName() {
	return name;
    }
}
